New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory Leak issue in combination with Vue.js #300
Comments
Yo! Thanks for filing this, Brad :) Issue 1: Putting an animation call (to Velocity or otherwise) inside a setInterval is bad practice to begin with, but making the setInterval's timeout only 10ms is even worse practice (it's less than the typical rAF tick rate) and is guaranteed to cause memory issues. Issue 2: I'd need to see this problem getting triggered only with Velocity. Vue has no bearing on a Velocity bug, so I would need an actual stripped down test case of this bug occurring without Vue at all. |
hey thanks for responding so quickly! I slowed the timeout down to avoid guaranteed memory issues, but the problem persists. As far as using only velocity, it works fine. This code for example: http://jsfiddle.net/hRAn7/16/ Similarly the problem doesn't appear when I use only Vue and use jquery .animate instead of velocity. The problem only seems to appear with the combination of the two. I realize Vue's not your responsibility, I was just hoping you might have heard of something like this before. |
Have you tried refactoring to use Velocity's |
Well, I kind of misspoke when I claimed I want the animations to loop. I want the animations to execute inside a loop. Every interval, new content comes in from the left, and sort of 'bumps' everything else which eases right until it reaches the far edge, where it is removed. So there's not really a specific element where the animation loops, and the easing distance varies based on the new content. |
I believe I found the problem. When Vue.js Would it be possible to have Velocity automatically clean up this data after an animation has completed? |
@jws305 Thanks so much.
|
Confirmed. Thanks guys! |
Added to FAQ. Thank you, everyone! <3 |
Hello Julian,
I am having memory issues using velocity in combination with the Vue.js framework. It appears that something in velocity is still referencing destroyed elements, so they're not being properly GC. Here are demonstrations in jsfiddle:
This code has memory leak using velocity: http://jsfiddle.net/hRAn7/8/
This code has velocity call removed, GC correctly: http://jsfiddle.net/hRAn7/7/
Can you make any suggestions as to what is wrong? Any help would be appreciated.
The text was updated successfully, but these errors were encountered: